package fr.mma.scrumm.factory;

import com.google.appengine.api.datastore.KeyFactory;

import fr.mma.scrumm.dto.StoryDTO;
import fr.mma.scrumm.model.Story;

public class StoryFactory extends AbstactFactory<StoryDTO, Story> {

	public StoryDTO build(Story story) {
		StoryDTO storyDTO = new StoryDTO();
		storyDTO.setEstimation(story.getEstimation());
		storyDTO.setNom(story.getNom());
		storyDTO.setProjet(story.getProjet());
		storyDTO.setUrl("rest/story/"+KeyFactory.keyToString(story.getKey()));
		return storyDTO;
	}

}
